#!/bin/bash -x

openssl req -new -x509 -days 9999 -nodes -newkey rsa:2048 \
    -out server-cert.pem -keyout server-key.pem \
    -subj "/C=US/ST=MO/L=St. Louis/O=OCI/CN=server"

cat server-cert.pem >>server-key.pem
cat server-cert.pem >ca.pem

openssl req -new -x509 -days 9999 -nodes -newkey rsa:2048 \
    -out client-cert.pem -keyout client-key.pem \
    -subj "/C=US/ST=MO/L=St. Louis/O=OCI/CN=client"

cat client-cert.pem >>client-key.pem
cat client-cert.pem >>ca.pem

